snapcraft.yaml does not allow WatchdogSec for systemd services
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
Snapcraft allows a "daemon: notify" type which enables the watchdog feature of systemd. However, systemd will not enable the watchdog feature unless the systemd service field "WatchdogSec=x"is present with a non-zero value. The default value if the field is not specified is 0, thus the watchdog feature is disabled.
This means that the daemon: notify type is not working at all.
I have a daemon process that uses the notify mechanism by sending "WATCHDOG=1" via sd_notify as described in the systemd documentation, https://www.freedesktop.org/software/systemd/man/systemd.service.html
When I stop sending the WATCHDOG=1 message, the service should restart automatically. However, it does not restart because the WatchdogSec value has not been provided.
Recommendation is to add: watchdog-sec: 5 (example) to snapcraft.yaml which will then generate "WatchDogSec=5" in the [Service] section of the systemd .service file for the snap.
Evaluation history
No evaluation history available.